package com.ruoyi.redis.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.redis.service.IShopService;

/**
 * @Description: 
 * @ClassName: RedisAndAuthCode
 * @author syc
 * @date: 2022年6月7日 下午6:01:19
 */
@RestController
@RequestMapping(value = "shop", method = RequestMethod.POST)
public class ShopController {

	@Autowired
	private IShopService shopService;
	
	/**
	 * @Description: 根据
	 * @author syc
	 * @date: 2022年6月7日 下午6:46:50
	 */
	@RequestMapping("getbyid")
	public JSONObject getPhoneAuthCode(@RequestBody JSONObject requestJson) {
		JSONObject returnJson = new JSONObject();
		Long id = requestJson.getLong("id");
		if (id == null) {
			returnJson.put("error", "商铺id不能为空!");
			return returnJson;
		}
		return shopService.queryById(id);
	}
	
	
}
